<?php 
/**
* @author Oliver Leisalu, Inditel Meedia
* @package DomFg
* @subpackage Input
*/
class DomFgUpload extends DomFgInput {
	
	/**
	 * @var String
	 */
	protected $handlerUrl;
	/**
	 * @var String
	 */
	protected $refreshUrl;
	/**
	 * Allowed file types.
	 * 
	 * Sample:
	 * *.*
	 * *.png;*.jpg;*.gif
	 * 
	 * @var String
	 */
	protected $fileTypes = '*.*';
	
	public function __construct( $name = NULL ) {
		parent::__construct( $name );
	}
	
	public function handlerUrl( $url ) {
		$this->handlerUrl = $url;
	}
	
	public function fileTypes( $fileTypes ) {
		$this->fileTypes = $fileTypes;
	}
	
	public function refreshUrl( $refreshUrl ) {
		$this->refreshUrl = $refreshUrl;
	}
	
	/**
	* @return NULL
	*/
	public static function parsePost( $name, &$post ) {
		return null;
	}
	
	public function render() {
		$renderer = $this->getRenderer();
		$renderer->assign('input', $this );
		$renderer->assign('sessionId', session_id() );
		return $renderer->fetch('Input/Upload.html');
	}
	

}
?>